package servlet;

import pojo.ST;
import Hbase.update;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

@WebServlet("/updateServlet")
public class updateServlet extends HttpServlet{
    public void init (HttpServletRequest req, HttpServletResponse resp) throws UnsupportedEncodingException {
        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html;charset=utf-8");
        resp.setCharacterEncoding("utf-8");
    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        init(req, resp);
        String id=req.getParameter("id");
        String name = req.getParameter("name");

        String number = req.getParameter("number");
        String status = req.getParameter("status");


        ST studentTable = new ST();
        studentTable.setStudentID(id);
        studentTable.setStudentName(name);
//        studentTable.setStudentDate(date);
        studentTable.setStudentNumber(number);
    //    studentTable.setStudentSemester(semester);
        studentTable.setStudentStatus(status);

        update update=new update(studentTable);



    }
}
